<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
<title></title> {include file="common/pub_style" /}
<style type="text/css">
.list-wallet .item {border-radius: 18px; margin-bottom: 10px;}
.trc_bg {background: linear-gradient(0deg, #f78a9e, #f56f87 50%, #fe988b);}
.erc_bg {background: linear-gradient(0deg,#48c6ef,#6f86d6);}
.copy {width: 35px;	height: 35px;}
.layui-layer-title {background: #7670d9; color:#fff;}
.layui-layer-dialog .layui-layer-content {background: linear-gradient(270deg,#1e2534,#0c1a37); color: #fff}
.layui-layer-btn {background: linear-gradient(270deg,#1e2534,#0c1a37);}
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$(".btnadd").click(function() {
			window.location.href = "{:url('add')}";
		})
		$(".btndel").click(function(){
            var id = $(this).data('id');
            var layer1 = layer.open({
              title: "{$Think.lang.input_enter_paypwd_tips}",
              content: '<input type="password" id="paypwd" class="form-control" placeholder="{$Think.lang.input_enter_paypwd_tips}" style="border: 1px solid #ccc; color: #fff"/>',
              btn:["{$Think.lang.btn_submit}","{$Think.lang.btn_cancel}"],
              yes: function(index, layero){
                  var paypwd = $('body').find('#paypwd').val();
                  $.ajax({
                    type: "POST",
                    url: "{:url('del')}",
                    dataType: "json",
                    data:{
                        id : id,
                        paypwd : paypwd
                    },
                    //请求成功
                    success : function(result) {
                    	//console.log(result);
                        layer.close(layer1);//关闭弹窗              
                        if (result.code ==99) {
                          layer.msg(result.msg);
                          reload();
                        }
                        else
                          layer.msg(result.msg);
    				// 	location.reload();
                    },
                    //请求失败，包含具体的错误信息
                    error : function(e){
                        console.log(e.status);
                        console.log(e.responseText);
                    }
                });
              },
              btn2: function(index, layero){
                  
              }
            })
		})
	})
</script>
</head>
<body>
	<div class="header-wrap">
		<div class="flex flex-between pd10">
			<div class="left-arrow" onclick='javascript:window.location.href="{:url('Main/index')}"'></div>
			<div class="">{$Think.lang.menu_wallet}</div>
			<div class=""></div>
		</div>
	</div>
	<div style="height: 70px"></div>
	<div class="list-wallet pd10">
		{volist name="data" id="vo"}
		<div class="item pd20 {eq name='vo.type' value='trc20'}trc_bg{else/}erc_bg{/eq}">
			<div class="flex flex-between align-center">
				<div class="">
					<span class="q-mr-md text-h6 text-white text-weight-bold">{eq name='vo.type' value='trc20'}TRC20{else/}ERC20{/eq}</span><span class="text-body1 text-white">USDT</span>
				</div>
				<div class="icon">
				    {eq name='vo.type' value='trc20'}
					<img src="__PUBLIC__/image/trc20.png" width="45">
					{else/}
					<img src="__PUBLIC__/image/erc20.png" width="45">
					{/eq}
				</div>
			</div>
			<br>
			<div class="flex flex-between align-center">
				<div class="address">{$vo.address}</div>
				<div class="icon  q-mr-md btndel" data-id="{$vo.id}">
					<img src="__PUBLIC__/image/del.png" width="18">
				</div>
			</div>
		</div>
		{/volist}
	</div>
	<div class="pd20">
		<button type="button" class="input-btn btnform btnred btnadd">
			<span class="btn-content"> <span>{$Think.lang.create_wallet_address}</span>
			</span>
		</button>
	</div>
	{include file="common/footer" /}
</body>
</html>